<?php
/*
*会员修改
*/
namespace Admin\Func;

class Func909010101 {
    var  $db;
    var $rst;
    var $errmsg;
    var  $VIPNo;
    var  $VIPLoginCode;
    var  $VIPName;
    var  $VIPNickName;
    var  $VIPPhoneNo;
    var  $Sex;
    var  $BirthDay;
    var  $Mail;
    var  $VIPType;
    var  $VIPLevel;
    var  $VIPFigthValue;
    var  $VIPIMG;

    public function __construct($VIPNo,$VIPLoginCode,$VIPName,$VIPNickName,$VIPPhoneNo,$Sex,$BirthDay,$Mail,$VIPType,$VIPLevel,$VIPFigthValue,$VIPIMG) {
        $this->db  = new \Think\Model();
        $this->errmsg = '';
        $this->VIPNo = addslashes($VIPNo);
        $this->VIPLoginCode = addslashes($VIPLoginCode);
        $this->VIPName = addslashes($VIPName);
        $this->VIPNickName = addslashes($VIPNickName);
        $this->VIPPhoneNo = addslashes($VIPPhoneNo);
        $this->Sex = addslashes($Sex);
        $this->BirthDay = addslashes($BirthDay);
        $this->Mail = addslashes($Mail);
        $this->VIPType = addslashes($VIPType);
        $this->VIPLevel = addslashes($VIPLevel);
        $this->VIPFigthValue = addslashes($VIPFigthValue);
        $this->VIPIMG = addslashes($VIPIMG);

    }
    /*
    *获取错误信息
    */
    public function getErrMsg() {
        return $this->errmsg;
    }
    /*
    *验证
    */
    private function validate(){
        return true;
    }
    /*
    *执行
    */
    public function execute(){
        $vflag = true;
        $OperID = I('OperID');
        if($this->validate()){

            $sql = <<<EOD
INSERT INTO t_lz_vs_viper_basic(
VIPNo,
VIPLoginCode,
VIPName,
VIPNickName,
VIPPhoneNo,
Sex,
BirthDay,
Mail,
VIPType,
VIPLevel,
VIPFigthValue,
VIPIMG,

        OperID,
        OperDate
        )values(
        '$this->VIPNo',
        '$this->VIPLoginCode',
        '$this->VIPName',
        '$this->VIPNickName',
        '$this->VIPPhoneNo',
        '$this->Sex',
        '$this->BirthDay',
        '$this->Mail',
        '$this->VIPType',
        '$this->VIPLevel',
        '$this->VIPFigthValue',
        '$this->VIPIMG',

        '$OperID',
        now()
)

EOD;

            //$this->rst = $this->db->query($sql);
            $this->rst = $this->db->execute($sql);
            if ($this->rst === false){
                $this->errmsg = $this->db->getDbError();
                $vflag = false;
            }else{
                $vflag = true;  
            }
        }else{
            $vflag = false;
        }
    return  $vflag;
    }
    public function getRst(){
        return $this->rst;
    }
}
